package com.ch06.controlle;

import com.ch06.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @ClassName Main
 * @Description TODO
 * @Author Kx
 * @Date 2025/4/29 10:34
 * @Version 1.0
 */
public class Main {
    public static void main(String[] args) {
        // 读取xml文件获取容器对象
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

        // 获取控制层对象
        UserService userService = context.getBean("userService", UserService.class);

        userService.save();
    }
}
